Skip to content

fix: use substring match in notes search#14

Open
vvjadmin wants to merge 1 commit into
mate-academy:mainfrom
vvjadmin:fix/notes-search-substring-match
Open

fix: use substring match in notes search#14
vvjadmin wants to merge 1 commit into
mate-academy:mainfrom
vvjadmin:fix/notes-search-substring-match

Conversation

@vvjadmin

Copy link
Copy Markdown

Summary

  • matches() in lib/store.js was filtering notes using strict equality (===) instead of substring inclusion, causing all search tests to fail with 0 !== 2 and 0 !== 1

Test plan

  • npm test passes all 3 tests after the fix
  • search finds every note that contains the term — returns 2 results for "milk"
  • search finds a single containing note — returns 1 result for "bank"
  • search returns nothing when no note contains the term — returns 0 for "xyz"

🤖 Generated with Claude Code

matches() was using strict equality, causing all search tests to fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant